package com.example.controller;

import com.example.common.Result;
import com.example.entity.GreenHouse;
import com.example.entity.SensorData;
import com.example.entity.Sensors;
import com.example.service.SensorDataService;
import com.example.service.SensorService;
import com.example.service.UserService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/sensorData")
public class SensorDataController {

    @Resource
    private SensorDataService sensorDataService;

    //插入传感器数据
    @PostMapping("/add/sensorData")
    public Result addSensorData(@RequestBody SensorData sensorData){
        return sensorDataService.addSensorData(sensorData);
    }

    //获取大棚下各个传感器数据
}
